pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut res = 0;
    let mut cur = 1;
    let mut last = 0;
    while cur < threshold {
        if cur % 2 == 1 {
            res += cur;
        }
        let tmp = cur;
        cur += last;
        last = tmp;
    }
    res
}
